﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.Json.Serialization;

namespace Model
{
    //排课表
    public class CourseScheduling
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //排课id
        public int CourseSchedulingId { get; set; }
        //课程id
        public int CourseId { get; set; }
        //班级id
        public int ClassId { get; set; }
        //教师id
        public int TeacherId { get; set; }
        //教室id
        public int ClassroomId { get; set; }
        //资料id
        public int LearningMaterialId { get; set; }
        //上课时间
        public DateTime ClassBegin { get; set; }
        //下课时间
        public DateTime ClassEnd { get; set; }
        //软删除
        public Boolean IsDelete { get; set; }
        //创建时间
        public DateTime CreateTime { get; set; } = DateTime.Now;
        //更新时间
        public DateTime UpdateTime { get; set; } = DateTime.Now;

        //导航属性
        [JsonIgnore]
        //指向Teacher
        public Teacher Teacher { get; set; }
        //指向LearningMaterial
        public LearningMaterial LearningMaterial { get; set; }
        //指向Classroom
        public Classroom Classroom { get; set; }
        //指向Course
        public Course Course { get; set; }

    }
}
